#!/usr/bin/env python
# --*-- conding:utf-8 --*--
# @Time : 2024/1/28
# @Author : liangpp
# @Email : mobaicloud@163.com
# @Software : PyCharm


from carlargescreen.models import CarInfo


def get_centerright():
    allcars = CarInfo.objects.all()
    you_list = []
    dian_list = []
    other_list = []
    for car in allcars:
        if car.energyType == "汽油":
            d_list = [car.car_name, car.count, car.energyType]
            you_list.append(d_list)
        elif car.energyType == "纯电动":
            d_list = [car.car_name, car.count, car.energyType]
            dian_list.append(d_list)
        else:
            d_list = [car.car_name, car.count, car.energyType]
            other_list.append(d_list)
    # print(you_list[:5])
    # print(dian_list[:5])
    # print(other_list[:5])
    return you_list[:10], dian_list[:10], other_list[:10]
